#include "Common.hlsli"

Texture2D Texture;
SamplerState Sampler;

static const float Weights[] =
{
    0.2270270270, 0.3162162162, 0.0702702703
};

static const float Offsets[] =
{
    0.0f, 1.3846153845f, 3.2307692304
};

float4 main(PixelInput input) : SV_TARGET
{
    float4 color = Weights[0] * Texture.Sample(Sampler, input.Tex);
    uint width, height;
    Texture.GetDimensions(width, height);
    for (int i = 1; i < 3; ++i)
    {
        color += Weights[i] * Texture.Sample(Sampler, input.Tex + float2(Offsets[i] / width, 0.0f));
        color += Weights[i] * Texture.Sample(Sampler, input.Tex - float2(Offsets[i] / width, 0.0f));
    }
    return color;
}